package com.mengtian_tech.tju.dataquery.api.controller;

import java.text.ParseException;
import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mengtian_tech.tju.dataquery.api.service.AskLeaveService;
import com.mengtian_tech.tju.dataquery.api.service.QueryCarService;
import com.mengtian_tech.tju.dataquery.api.service.QueryLogService;
import com.mengtian_tech.tju.dataquery.api.service.QueryPersonService;
import com.mengtian_tech.tju.dataquery.api.util.ResponseUtil;

/**
 * 查询控制器
 * @author wxd56
 *
 */
@RestController
@RequestMapping("/api/query_log")
public class QueryLogController {
	
	@Autowired
	QueryCarService queryCarService;
	
	@Autowired
	QueryPersonService queryPersonService;
	
	@Autowired
	AskLeaveService askLeaveService;
	
	@Autowired
	QueryLogService queryLogService;
	
	
	/**
	 * 首页综合查询
	 * @param key
	 * @param pageNo
	 */
	@RequestMapping("save")
	public Object save(HttpServletRequest req,String remark,String type,String key) throws ParseException {
		
		//记录日志
		this.queryLogService.addLog(req.getRemoteUser(),type,key, remark);
		return ResponseUtil.ok();
		
	}
	
		
}
